package com.pug.service.user;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pug.domain.KssUser;
import com.pug.domain.vo.KssUserVo;
import com.pug.mapper.KssUserMapper;
import org.springframework.stereotype.Service;

@Service
public class KssUserServiceImpl extends ServiceImpl<KssUserMapper, KssUser> implements KssUserService{
    @Override
    public KssUser login(KssUserVo userVo) {
        LambdaQueryWrapper<KssUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(KssUser::getUsername,userVo.getUsername());
        lambdaQueryWrapper.eq(KssUser::getPassword,userVo.getPassword());
        KssUser kssUser = this.getOne(lambdaQueryWrapper);
        return kssUser;
    }
}
